package com.ruoyi.dispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dispatch.mapper.MineInformationMapper;
import com.ruoyi.dispatch.domain.MineInformation;
import com.ruoyi.dispatch.service.IMineInformationService;

/**
 * 矿井基础信息Service业务层处理
 * 
 * @author wuxiaofang
 * @date 2025-04-01
 */
@Service
public class MineInformationServiceImpl implements IMineInformationService 
{
    @Autowired
    private MineInformationMapper mineInformationMapper;

    /**
     * 查询矿井基础信息
     * 
     * @param mineInfoId 矿井基础信息主键
     * @return 矿井基础信息
     */
    @Override
    public MineInformation selectMineInformationByMineInfoId(Long mineInfoId)
    {
        return mineInformationMapper.selectMineInformationByMineInfoId(mineInfoId);
    }

    /**
     * 查询矿井基础信息列表
     * 
     * @param mineInformation 矿井基础信息
     * @return 矿井基础信息
     */
    @Override
    public List<MineInformation> selectMineInformationList(MineInformation mineInformation)
    {
        return mineInformationMapper.selectMineInformationList(mineInformation);
    }

    /**
     * 新增矿井基础信息
     * 
     * @param mineInformation 矿井基础信息
     * @return 结果
     */
    @Override
    public int insertMineInformation(MineInformation mineInformation)
    {
        mineInformation.setCreateTime(DateUtils.getNowDate());
        return mineInformationMapper.insertMineInformation(mineInformation);
    }

    /**
     * 修改矿井基础信息
     * 
     * @param mineInformation 矿井基础信息
     * @return 结果
     */
    @Override
    public int updateMineInformation(MineInformation mineInformation)
    {
        mineInformation.setUpdateTime(DateUtils.getNowDate());
        return mineInformationMapper.updateMineInformation(mineInformation);
    }

    /**
     * 批量删除矿井基础信息
     * 
     * @param mineInfoIds 需要删除的矿井基础信息主键
     * @return 结果
     */
    @Override
    public int deleteMineInformationByMineInfoIds(Long[] mineInfoIds)
    {
        return mineInformationMapper.deleteMineInformationByMineInfoIds(mineInfoIds);
    }

    /**
     * 删除矿井基础信息信息
     * 
     * @param mineInfoId 矿井基础信息主键
     * @return 结果
     */
    @Override
    public int deleteMineInformationByMineInfoId(Long mineInfoId)
    {
        return mineInformationMapper.deleteMineInformationByMineInfoId(mineInfoId);
    }
}
